<template>
  <van-tabbar route>
    <van-tabbar-item icon="home-o" to="/">首页</van-tabbar-item>
    <van-tabbar-item icon="search" to="/list">列表</van-tabbar-item>
    <van-tabbar-item icon="shopping-cart-o" to="/shopcar" :badge="shopCarListNum">购物车</van-tabbar-item>
    <van-tabbar-item icon="setting-o" to="/user">会员中心</van-tabbar-item>
  </van-tabbar>
</template>

<script>
import { createNamespacedHelpers } from "vuex";
const { mapState } = createNamespacedHelpers("shopcar");
export default {
  computed:{
    ...mapState(["shopCarListNum"])
  },
};
</script>

<style></style>
